package com.yhf.service.impl;

import com.yhf.bean.Grade;
import com.yhf.mapper.GradeMapper;
import com.yhf.service.GradeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class GradeServiceImpl implements GradeService {
    @Autowired
    private GradeMapper gradeMapper;
    @Override
    public Grade findByName(String name) {
        return gradeMapper.findByName(name);
    }

    @Override
    public int addGrade(Grade grade) {
        return gradeMapper.addGrade(grade);
    }

    @Override
    public List<Grade> getGradeList(Grade grade) {
        return gradeMapper.getGradeList(grade);
    }

    @Override
    public int updateGrade(Grade grade) {
        return gradeMapper.updateGrade(grade);
    }

    @Override
    public int deleteGrade(Integer[] ids) {
        return gradeMapper.deleteGrade(ids);
    }

    @Override
    public List<Grade> selectAll() {
        return gradeMapper.selectAll();
    }
}
